package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.ReportLogDTO;
import com.sikaryofficial.backend.domain.dto.req.ReportReq;
import com.sikaryofficial.backend.domain.dto.resp.ReportDTO;
import com.sikaryofficial.backend.domain.entity.UserReport;
import com.sikaryofficial.backend.domain.entity.UserReportLog;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 举报映射
 * @date : 2023/11/08 10:47
 */
@Mapper
public interface ReportMapping {

    ReportMapping INSTANCE = Mappers.getMapper(ReportMapping.class);

    /**
     * req -> entity
     *
     * @param req
     * @return
     */
    UserReport coverToEntity(ReportReq req);

    /**
     * entity -> dto
     *
     * @param input
     * @return
     */
    ReportDTO coverToDTO(UserReport input);

    /**
     * entity -> dto
     *
     * @param inputList
     * @return
     */
    List<ReportDTO> coverToDTOList(List<UserReport> inputList);


    /**
     * entity -> dto
     *
     * @param input
     * @return
     */
    ReportLogDTO coverLogToDTO(UserReportLog input);

    /**
     * entity -> dto
     *
     * @param inputList
     * @return
     */
    List<ReportLogDTO> coverLogToDTOList(List<UserReportLog> inputList);

}
